const dev = {
    /** port 端口 */
    serverPort: 86,
    dbConfig: {
        host: '39.104.61.253',
        user: 'root',
        port: '3306',
        password: 'ankuai',
        database: 'ad_check',
        waitForConnections: true,
        connectionLimit: 10,
        queueLimit: 0,
    },
    whiteList: ['/ad/api/oper/login','/user/login', '/images','/ad/api/lsy/notify','/ad/api/applet/getOpenID','/ad/api/applet/getPhoneNumber'],
    applet_param: {
        APPID: 'wx44f6e36d01b35ebf',
         APPSECRET: 'cf3954aa0d2593ea83fb031faf9f16d0'
    },
};

const production = {
    /** port 端口 */
    serverPort: 87,
    dbConfig: {
        host: 'rm-wz9d2pe64fz3z66a83o.mysql.rds.aliyuncs.com',
        user: 'soft_oprt',
        port: '3306',
        password: 'vocation_ca_123',
        database: 'vocation_ca',
        waitForConnections: true,
        connectionLimit: 50,
        queueLimit: 0,
    },
    whiteList: ['/oper/login','/user/login', '/images','/fy/notif','/ad/api/applet/getOpenID'],
    applet_param: {
        APPID: 'wx44f6e36d01b35ebf',
         APPSECRET: 'cf3954aa0d2593ea83fb031faf9f16d0'
    },
};

const local = {
    whiteList: ['/oper/login'],
};

let config = {
    /** port 端口 */
    serverPort: 9961,
    dbConfig: {
        host: 'dev.ktpark.net',
        user: 'root',
        port: '3306',
        password: 'ankuai',
        database: 'bcck',
        waitForConnections: true,
        connectionLimit: 10,
        queueLimit: 0,
    },
    whiteList: ['/oper/login', '/images', '/api/pay_notify', '/api/pay/appletPay', '/applet/queryPrice', '/api/applet/noPlateIn', '/api/lsy/merchant_status_change/notice', '/api/applet/isChannelPay'],
    createNotifyCallBack: 'http://dev.ktpark.net:9961/api/lsy/merchant_status_change/notice',
};

(() => {
    console.log('process.env.NODE_ENV', process.env.NODE_ENV);
    config = {
        ...config,
        ...{ dev, production }[process.env.NODE_ENV || 'dev'],
    };
  //  console.log('config', config);
})();

export default config;
